import request from '@/utils/request'
const api_hospital = '/api/hosp/site'
const api_hospital2=`/admin/hosp/hospitalSet`
export default {
    //根据查询条件对医院进行分页查询
    selectPage(page, limit, serachObj) {
        return request({
            url: `${api_hospital}/selectPage/${page}/${limit}`,
            method: 'get',
            params: serachObj
        })
    },
    //根据医院名字进行模糊查询
    findHospitalByName(hospname) {
        return request({
            url: `${api_hospital}/findHospitalByName/${hospname}`,
            method: 'get'
        })
    },
    //获取科室列表
    getDepartmentByHoscode(hoscode) {
        return request({
            url: `${api_hospital}/getDepartment/${hoscode}`,
            method: 'get'
        })
    },
    //获取获取医院预约挂号详情
    showHospital(hoscode) {
        return request({
            url: `${api_hospital}/showByHoscode/${hoscode}`,
            method: 'get'
        })
    },
    //获取可预约排班分页数据
    getBookingScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `${api_hospital2}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get'
        })
    },
    //获取排班数据
    findScheduleList(hoscode, depcode, workDate) {
        return request({
            url: `${api_hospital2}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },
    //根据排班id获取排班数据
    getSchedule(id) {
        return request({
          url: `${api_hospital2}/getSchedule/${id}`,
          method: 'get'
        })
    }
}